import request from "@/utils/request";

//新增接班
export const addCarryOn = (data) => {
  return request({
    url: "prod/ProdChangeShifts/carryOn",
    method: "post",
    data,
  });
};

//修改接班
export const editCarryOn = (data) => {
  return request({
    url: "prod/ProdChangeShifts/editCarryOn",
    method: "post",
    data,
  });
};

//交班
export const shiftHandover = (data) => {
  return request({
    url: "prod/ProdChangeShifts/shiftHandover",
    method: "post",
    data,
  });
};

//编辑接口
export const updateShiftSchedule = (data) => {
  return request({
    url: "plan/planSchedule",
    method: "put",
    data,
  });
};
//查询接口
export const listChangeShifts = (params) => {
  return request({
    url: "prod/ProdChangeShifts/list",
    method: "get",
    params,
  });
};

//查询上一班信息
export const queryPreviousClassInfo = (data) => {
  return request({
    url: "prod/ProdChangeShifts/queryPreviousClassInfo",
    method: "post",
    data,
  });
};

//详情
export const getProdChangeShiftsDetail = (id) => {
  return request({
    url: `prod/ProdChangeShifts/` + id,
    method: "get",
  });
};
// 交接班日志
export const stationLog = (params) => {
  return request({
    url: `prod/ProdChangeShifts/stationLog`,
    method: "get",
    params
  });
};
// 交接班日志
export const addLog = (data) => {
  return request({
    url: `prod/ProdWorkStationChangeLog`,
    method: "post",
    data
  });
};
// 交接班日志
export const editLog = (data) => {
  return request({
    url: `prod/ProdWorkStationChangeLog`,
    method: "put",
    data,
  });
};
// 交接班日志
export const queryLogList = (params) => {
  return request({
    url: `prod/ProdWorkStationChangeLog/list`,
    method: "get",
    params,
  });
};
